function saveHardLabels(filename, hardLabels)

fid = fopen(filename, 'w');

numberOfPaths = numel(hardLabels);
fprintf(fid, '%d\n', numberOfPaths);

for i = 1:size(hardLabels, 1)
    for j = 1:size(hardLabels, 2)
        fprintf(fid, '%d\n', length(hardLabels{i, j}));
        fprintf(fid, '%d ', hardLabels{i, j});
        fprintf(fid, '\n');
    end
end

fclose(fid);
